package com.ruoyi.face.domain;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

public class QueryResult<T> {

    @JsonProperty(value = "request_id")
    private String requestId;

    private Paging paging;

    private List<T> data;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Paging getPaging() {
        return paging;
    }

    public void setPaging(Paging paging) {
        this.paging = paging;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "QueryResult{" +
                "requestId='" + requestId + '\'' +
                ", paging=" + paging +
                ", data=" + data +
                '}';
    }

    public class Paging {

        private Integer limit;

        private Integer offset;

        private Integer total;

        public Integer getLimit() {
            return limit;
        }

        public void setLimit(Integer limit) {
            this.limit = limit;
        }

        public Integer getOffset() {
            return offset;
        }

        public void setOffset(Integer offset) {
            this.offset = offset;
        }

        public Integer getTotal() {
            return total;
        }

        public void setTotal(Integer total) {
            this.total = total;
        }

        @Override
        public String toString() {
            return "Paging{" +
                    "limit=" + limit +
                    ", offset=" + offset +
                    ", total=" + total +
                    '}';
        }
    }
}
